#ifndef PERSPECTIVE_MODEL_H_
#define PERSPECTIVE_MODEL_H_

#include "model.h"
#include "height_model.h"
#include "top_model.h"
#include <iostream>
#include "column.h"

class PerspectiveModel : public Model{
	private:
		std::vector<Column> columns;
		std::vector<Point> points;
		std::vector<Point> railPoints;
		Model& hModel;
		Model& tModel;

		static const unsigned int columnStep;
		static const float columnWidth;
		static const float columnDepth;
		static const float railWidth;
		static const float railHeight;

	public:
		PerspectiveModel(Model& hModel,Model& tModel);
		~PerspectiveModel();

		void calculate();

		void calculateRailPoints();
		void calculateColumns();

		unsigned int pointSize(){
			return points.size();
		}

		std::vector<Column>::const_iterator columnBegin(){
			return columns.begin();
		}

		std::vector<Column>::const_iterator columnEnd(){
			return columns.end();
		}

		std::vector<Point>& getRailPoints(){
			return railPoints;
		}

		std::vector<Column>& getColumns(){
			return columns;
		}

		std::vector<Point>::const_iterator pointBegin(){
			return points.begin();
		}

		std::vector<Point>::const_iterator pointEnd(){
			return points.end();
		}
};

#endif /* PERSPECTIVE_MODEL_H_ */
